Wiki:http://wiki.ros.org/camera_calibration
HD camera:https://github.com/bosch-ros-pkg/usb_cam.git
HD camera tutorials:http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration
You need a checkerboard. This tutorial uses a 9x6 checkerboard and a 20mm square, which should be flattened during calibration.
The calibration uses the internal vertex of the checkerboard, so the "10x7" checkerboard uses the internal vertex parameter "9x6", as shown in the example below.
The calibration board of any specification can be used, just change the parameters.
An open area without obstacles and calibration board patterns
Monocular camera that publishes images via ROS
Checkerboard (calibration board)
Start up Astra camera
xxxxxxxxxx
rosrun uvc_camera uvc_camera_node device:=/dev/video0
View picture topic
Start the calibration node
xxxxxxxxxx
rosrun camera_calibration cameracalibrator.py image:=/image_raw camera:=/ --size 9x6 --square 0.02
size: The number of internal corners of the calibrated checkerboard, such as 9X6, the corners have six rows and nine columns.
square: The side length of the checkerboard, in meters.
image and camera: Set the topic of the image released by the camera.
Calibration interface
X: The left and right movement of the checkerboard in the camera field of view
Y: The checkerboard moves up and down in the camera's field of view
Size: the back and forth movement of the checkerboard in the camera's field of view
Skew: The tilt and rotation of the checkerboard in the camera field of view
After the startup is successful, put the checkerboard into the center of the screen and change different poses. The system will recognize it autonomously. In the best case, the lines under [X], [Y], [Size], and [Skew] will first change from red to yellow and then to green as the data is collected, filling them as much as possible.
Click [CALIBRATE] to calculate the camera internal parameters, the more pictures, the longer the time, just wait.
Click [SAVE] to save the uncalibrated result, the bottom line appears, click [COMMIT] to exit.。
After the calibration, the calibration result is stored in [/tmp/calibrationdata.tar.gz], you can move it out to see the content
xxxxxxxxxx
sudo mv /tmp/calibrationdata.tar.gz ~
After decompression, there are the image just calibrated, an ost.txt file and an ost.yaml file. The yaml file is what we need, but it needs to be modified before it can be used.
-Change ost.yaml to head_camera.yaml -Change the name of camera_name: to head_camera -Move the file to ~/.ros/camera_info folder